<?php
namespace plugin\videoappdownload\api;

use think\facade\Db;
use think\facade\View;
use plugin\videoappdownload\common\Common;
use plugin\videoappdownload\model\PluginVideoappdownloadAd as models;
use plugin\videoappdownload\validate\AdValidate as validates;
use think\facade\Request;
use app\banmi\common\Basehome;

class Ad extends Basehome
{
    public $NotLogin=["lists"];
     //$this->uid;  获取用户登录的uid
     //$NotLogin   没在$NotLogin设置的方法是强制登录的 没登录则 提示没登录
     //$NotLogin   在里面设置也会获取登录的uid 如果没登录 则this->uid;返回的值是0 如登录则大于0
     
     // public $GetList=["lists"];
     //默认全部都是post请求 如设置$GetList 则为get请求
	

    public function lists()
    {
        $request= (new validates())->IsCheck('lists');
        $field="";
        $map   =[];
   
        $map[]  = ["status", "=", 2 ];
        $map[] = ["open", "=", 1 ];
 
        $model =(new models())->paginate($map, $field, $order='sort asc', $page=200);
        $data['list']=$model;
        ajaxmsg('ok', 200, $data);
    }
}
